package com.stu.test;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;

/**
 * ClassName: CountryServlet
 * Package: com.stu.test
 * Description: @Version 1.0
 */
@WebServlet("/country")
public class CountryServlet extends HttpServlet {
    @Override
    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        response.setContentType("text/html;charset=utf-8");
        List<Histogram> list=TestSecond.getHistogram();
        HttpSession session=request.getSession(true);
        session.setAttribute("histogram",list);
        request.getRequestDispatcher("/Show3.jsp").forward(request,response);
    }
}
